import { ref } from "vue"
//屏幕适配
;(function () {
  function w() {
    const r = document.documentElement
    let a = r.getBoundingClientRect().width
    if (a > 750) {
      a = 750
    }
    const rem = a / 7.5
    r.style.fontSize = rem + "px"
  }

  const t = ref()
  w()
  window.addEventListener(
    "resize",
    function () {
      clearTimeout(t.value)
      t.value = setTimeout(w, 30)
    },
    false
  )
})()
